from public.action import *
from public.business import *
from public.testData import *
from public.tools import *
import time
testCase = "DBshop016_删除侧边设置流程"
# 登录后台，商品管理，管理分类，前台侧边设置
firefox=openBrowser(url)
firefox.get(urlAdmin)
DBshopLoginAdmin(firefox)
# 删除侧边侧边显示
DBshopEnterMenu3(firefox,'商品管理','管理分类',"前台侧边设置")
firefox.find_element_by_xpath('//td[contains(.,"网站很好看")]/following-sibling::td[3]/a[2]').click()
firefox.switch_to_alert().accept()
# 断言
try:
    firefox.find_element_by_xpath("//td[contains(.,'网站很好看')]").is_displayed()
    writeLog("%s 测试成功"%testCase)
except:
    writeLog("%s 测试失败" % testCase)
    getPhoto(firefox)
firefox.quit()